// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from './store/index'
import axios from 'axios'
import API from './api/content.js'
import VueBus from 'vue-bus'
import * as filters from './filter/index'
import 'babel-polyfill';
import promise from 'es6-promise'
promise.polyfill()

Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})
Vue.use(VueBus)


Vue.prototype.API = API
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.prototype.axios = axios
    /* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>',
    // mounted() {
    //     document.dispatchEvent(new Event('render-event'))
    // }
})